Determining the distance between two optical boundary surfaces spaced apart from each other in a first direction is of interest, for example, in the field of microscopy since the thickness of the cover glass in the case of embedded samples and the thickness of the base in the case of Petri dishes or sample vessels for inverted microscopy (such as e.g. multiwell plates, standard microplates, etc.) are important here in order to be able to carry out any necessary optical corrections, such as e.g. automatic focusing, and/or optical correction settings on microscope objectives. In particular, in respect of fully automated microscopic image acquisition processes it is increasingly important to know the thickness of the cover glass or the thickness of the base.